package com.yuwei.yurpc.registry;

import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;

/**
 * 用户服务
 *
 * @author yuwei
 * @date 13:06 2024/10/3
 */
public class LocalRegistry {
    private static final Map<String,Class<?>> registyMap = new ConcurrentHashMap<>();
    public static void register(String name,Class<?> clazz){
        registyMap.put(name,clazz);
    }
    public static Class<?> get(String name){
        return registyMap.get(name);
    }
    public static void delete(String name){
        registyMap.remove(name);
    }
}
